/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author julio
 */
@Entity
@Table(name = "fare_attributes")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FareAttributes.findAll", query = "SELECT f FROM FareAttributes f"),
    @NamedQuery(name = "FareAttributes.findByFareId", query = "SELECT f FROM FareAttributes f WHERE f.fareId = :fareId"),
    @NamedQuery(name = "FareAttributes.findByPrice", query = "SELECT f FROM FareAttributes f WHERE f.price = :price"),
    @NamedQuery(name = "FareAttributes.findByCurrencyType", query = "SELECT f FROM FareAttributes f WHERE f.currencyType = :currencyType"),
    @NamedQuery(name = "FareAttributes.findByPaymentMethod", query = "SELECT f FROM FareAttributes f WHERE f.paymentMethod = :paymentMethod"),
    @NamedQuery(name = "FareAttributes.findByTransfers", query = "SELECT f FROM FareAttributes f WHERE f.transfers = :transfers"),
    @NamedQuery(name = "FareAttributes.findByTransferDuration", query = "SELECT f FROM FareAttributes f WHERE f.transferDuration = :transferDuration")})
public class FareAttributes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "fare_id")
    private String fareId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "price")
    private String price;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "currency_type")
    private String currencyType;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "payment_method")
    private String paymentMethod;
    @Size(max = 2)
    @Column(name = "transfers")
    private String transfers;
    @Column(name = "transfer_duration")
    private Integer transferDuration;

    public FareAttributes() {
    }

    public FareAttributes(String fareId) {
        this.fareId = fareId;
    }

    public FareAttributes(String fareId, String price, String currencyType, String paymentMethod) {
        this.fareId = fareId;
        this.price = price;
        this.currencyType = currencyType;
        this.paymentMethod = paymentMethod;
    }

    public String getFareId() {
        return fareId;
    }

    public void setFareId(String fareId) {
        this.fareId = fareId;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getCurrencyType() {
        return currencyType;
    }

    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public String getTransfers() {
        return transfers;
    }

    public void setTransfers(String transfers) {
        this.transfers = transfers;
    }

    public Integer getTransferDuration() {
        return transferDuration;
    }

    public void setTransferDuration(Integer transferDuration) {
        this.transferDuration = transferDuration;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fareId != null ? fareId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FareAttributes)) {
            return false;
        }
        FareAttributes other = (FareAttributes) object;
        if ((this.fareId == null && other.fareId != null) || (this.fareId != null && !this.fareId.equals(other.fareId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.FareAttributes[ fareId=" + fareId + " ]";
    }
    
}
